<?php

/**
 * Created by PhpStorm.
 * User: aa
 * Date: 15/10/19
 * Time: 下午6:54
 */
class Dir {
	/**
	 * 生成一个连续的目录
	 * @param $path
	 */
	public function mkdirs($path) {
		if (is_dir($path)) return;
		$path = explode('/', rtrim($path, '/'));
		$dir = '';
		foreach ($path as $k => $v) {
			$dir .= $path[$k] . '/';
			if (!is_dir($dir)) mkdir($dir, 0777);
		}
	}
}